/***************************************************************************
 * File name: EPubBasicRootImp.h
 * Original author: caizhifei2003@163.com
 * Date: 2013.03.01
 ***************************************************************************/
#ifndef _EPUB_BASIC_ROOT_IMP_H_
#define _EPUB_BASIC_ROOT_IMP_H_

#include "IEPubBasicRoot.h"
#include "EPubPointer.h"
#include "IEPubMedia.h"
#include <string>
#include <map>

class EPubBasicRootImp : public IEPubBasicRoot
{
	typedef std::map<std::string, EPubPointer<IEPubMedia>>		EPubManifestList;
public:
	EPubBasicRootImp();

	virtual EPUB_BasicFileType GetBasicFileType() const { return EPUB_BFT_ROOT; }
	virtual EPubPointer<IEPubBuffer> Serialize() const;
	virtual EPUB_Result Deserialize(const EPubPointer<IEPubBuffer> buffer);

	virtual EPubPointer<IEPubPaging> GetPaging() const { return m_Paging; }

private:
	EPubManifestList				m_ManifestList;
	EPubPointer<IEPubPaging>		m_Paging;

	std::string						m_Version;								// [required]
	std::string						m_UniqueIdentifier;						// [required]
	std::string						m_Prefix;								// [optional]
	std::string						m_Lang;									// [optional]

	// metadata
	std::string						m_Title;								// [1 or more]
	std::string						m_Language;								// [1 or more]

	std::string						m_Contributor;							// [optional]
	std::string						m_Coverage;								// [optional]
	std::string						m_Creator;								// [optional]
	std::string						m_Date;									// [optional]
	std::string						m_Description;							// [optional]
	std::string						m_Format;								// [optional]
	std::string						m_Publisher;							// [optional]
	std::string						m_Relation;								// [optional]
	std::string						m_Rights;								// [optional]
	std::string						m_Source;								// [optional]
	std::string						m_Subject;								// [optional]
	std::string						m_Type;									// [optional]
};

#endif // _EPUB_BASIC_ROOT_IMP_H_